package org.com.coolfish.common.database.service;

import java.math.BigDecimal;
import java.util.List;

import org.com.coolfish.common.database.entity.KuyuOrderFlow;
import org.com.coolfish.common.database.repository.KuyuOrderAccountRepository;
import org.com.coolfish.common.database.repository.KuyuOrderFlowRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class KuyuOrderFlowService {
	
	@Autowired
    private KuyuOrderFlowRepository repository;
	@Transactional
	public void changeOrderFlow(BigDecimal money,Integer cardid) {
		repository.changeOrderFlow(money,cardid);
	}
	
	@Transactional
	public void changeOrderType(Integer cardid) {
		repository.changeOrderType(cardid);
	}
	
	@Transactional
	public void changeStatusOfKuyuOrderFlow(Integer cardId) {
		repository.changeStatusOfKuyuOrderFlow(cardId);
	}
	
	@Transactional
	public List<KuyuOrderFlow> findOrderByStatus() {
		return repository.fandOrderbyStatus();
	}
	
	
}
